A memristor cell is made of stacked layers of materials that exhibit memristive characteristics, such as non-volatile memristive resistance switching, volatile non-linear negative differential resistance switching, and metallic conduction. The memristor cell may be patterned and etched by lithographic processes to appropriate dimensions. To protect a memristor cell from subsequent processing steps, and/or to prevent chemical diffusion or electrical cross-talk, a sidewall spacer can be deposited on the sidewalls of the memristor cell.